<template>
    <div>
      <div class="search_title">"{{keyword}}"的搜索结果:</div>
      
      
      <br>
 
      <br>
      <br>
      <div>
        <div class="result_title">&nbsp;&nbsp;&nbsp;&nbsp;我的文档</div>
         <el-table :data="articleList" style="width: 100%;margin-top: 20px;">
       
        <el-table-column label="文档名称" width="350px">
          <template slot-scope="scope">
            <span>{{ scope.row.name }}</span>
          </template>
        </el-table-column>
        <el-table-column label="创建时间" width="350px">
          <template slot-scope="scope">
            <span>{{ scope.row.create_time }}</span>
          </template>
        </el-table-column>
        
      </el-table>

          <div class="result_title" style="margin-top: 20px;">&nbsp;&nbsp;&nbsp;&nbsp;团队文档</div>
          <el-table :data="teamList" style="width: 100%;margin-top: 20px;">
       
        <el-table-column label="文档名称" width="233px">
          <template slot-scope="scope">
            <span>{{ scope.row.name }}</span>
          </template>
        </el-table-column>
        <el-table-column label="创建时间" width="233px">
          <template slot-scope="scope">
            <span>{{ scope.row.create_time }}</span>
          </template>
        </el-table-column>
        <el-table-column label="创建者" width="234px">
          <template slot-scope="scope">
            <span>{{ scope.row.creator }}</span>
          </template>
        </el-table-column>
      </el-table>     
      </div>
    </div>

</template>
<script>
  
  import {mapActions, mapState} from 'vuex'
  export default {
    name: 'SearchResult',
    data(){
      return{

      }
    },
    components: {},
    mounted(){
          this.recordSearchDoc(this.keyword)
          console.log('12e21038029')
          console.log(this.teamList)
    },
    computed:{
      ...mapState(['keyword','articleList','teamList'])
    },
    methods:{
      ...mapActions(['recordSearchDoc'])
    }
  }
</script>

<style scoped>
 .search_title{
   font-size: 23px;
   color: #409eff;
   text-align: left;
 }
  .result_title{
    text-align: left;
    font-weight: bold;
  }
 .text {
   font-size: 14px;
 }

 .item {
   margin-bottom: 18px;
 }

 .clearfix:before,
 .clearfix:after {
   display: table;
   content: "";
 }
 .clearfix:after {
   clear: both
 }
</style>
